import yaml
from services.data_collector import DataCollector
from services.data_storage import DataStorage
from adapters.tushare_adapter import TushareAdapter

with open("config.yaml", "r") as f:
    config = yaml.safe_load(f)

adapter = TushareAdapter(config["data_source"]["token"])
storage = DataStorage(config["database"])
collector = DataCollector(adapter, storage)
collector.start_scheduler(
    symbols=["000001.SZ"],
    start_date="20230101",
    end_date="20231231",
    interval=1440  # 每日采集
)
